FROM openjdk:8-alpine
#MAINTAINER relufi relufi@gmail.com
VOLUME ["/tmp", "/logs ","/static"]
COPY target/tianlong-0.0.1-SNAPSHOT.jar /tianlong.jar

#RUN bash -c 'touch /app.jar'

#RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
#&& echo 'Asia/Shanghai' >/etc/timezone

#使用openjdk:8-alpine版必须设置时区
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apk del tzdata
EXPOSE 6666
ENTRYPOINT ["java", "-jar","/tianlong.jar"]
